import { Base } from '../../utils/base.js'; //调用基类的时候 
// 步骤1.import { Base } from '../../utils/base.js';
//     2. extends Base
//     3.constructor(){
//       super();
//     }

class JqIndex extends Base {
  constructor() {
    super();
  } //轮播图


  getRotary(callBack) {
    var params = {
      url: 'getRotary',
      sCallBack: function (res) {
        callBack && callBack(res);
      }
    };
    this.request(params);
  } //每日推荐and热门抢购


  RecommendedDaily(city, province, type, head, tail, callBack) {
    var params = {
      url: 'RecommendedDaily?city=' + city + '&province=' + province + '&type=' + type + '&head=' + head + '&tail=' + tail,
      sCallBack: function (res) {
        callBack && callBack(res);
      }
    };
    this.request(params);
  } //搜索页面


  getSearchFor(datarow, callBack) {
    var params = {
      url: 'getSearch?datarow=' + datarow,
      sCallBack: function (res) {
        callBack && callBack(res);
      }
    };
    this.request(params);
  }

}

export { JqIndex };